package com.bnzjy.srb.core.service;

import com.bnzjy.srb.core.pojo.entity.BorrowInfo;
import com.bnzjy.srb.core.pojo.entity.Lend;
import com.baomidou.mybatisplus.extension.service.IService;
import com.bnzjy.srb.core.pojo.vo.BorrowInfoApprovalVO;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 标的准备表 服务类
 * </p>
 *
 * @author Helen
 * @since 2021-12-13
 */
public interface LendService extends IService<Lend> {
    
    /**
     * 生成新标的 《从BorrowInfoServiceImpl 建立查询，接口在这》
     * @param borrowInfoApprovalVO
     * @param borrowInfo
     */
    void createLend(BorrowInfoApprovalVO borrowInfoApprovalVO, BorrowInfo borrowInfo);
    
    /**
     * 标的列表
     * @return
     */
    List<Lend> selectList();
    
    /**
     * 标的详情
     * @param id
     * @return
     */
    Map<String, Object> getLendDatail(Long id);
    
    /**
     * 还款方式，计算效益
     * @param invest
     * @param yearRate
     * @param totalmonth
     * @param returnMethod
     * @return
     */
    BigDecimal getInterestCount(BigDecimal invest, BigDecimal yearRate, Integer totalmonth, Integer returnMethod);
    
    /**
     * 满标放贷
     * @param id
     * @return
     */
    void makeLoan(Long id);
}
